import java.io.IOException;
import java.net.InetAddress;
import java.net.ServerSocket;

public class ConsoleApplication {
    public static void main(String[] args) {
        try {
            ServerSocket socket = new ServerSocket(1234, 0, InetAddress.getByName("localhost"));
            System.out.println("=Load LoadBalancer=");
            while (true) {
                new SocketServer(socket.accept());
            }
        } catch (IOException e) {
            System.out.print("Error of working master server!");
            e.printStackTrace();
        } catch (Exception e) {
            System.out.print("Error! " + e.getMessage());
            e.printStackTrace();
        }
    }
}
